package com.hao.desing.factory;

public class carFactory {
public static car getcar(String name) {
    if (name.equals("五菱")) {
        return new wuling();
    } else if (name.equals("特斯拉")) {
        return new tesila();
    }else
        return null;
}

}
